Field of the Invention
The present invention relates to an image processing apparatus and an image processing method for determining whether a document read by a reading device is a color document or a monochrome document.
Description of the Related Art
There is known a technique for determining whether a scanned image read by a reading device is a color image or a monochrome image (hereafter, referred to as color/monochrome determination technique). In this determination, it is determined whether a read document is a color document or a monochrome.
In the color/monochrome determination technique, in order to detect small color contents, there is used a technique of dividing the scanned image into blocks and determining whether each block is a color block or a monochrome block. Specifically, block regions are provided in the scanned image and it is determined whether each block region is a color block region or not based on the number of color pixels in the block region. If the number of color blocks is greater than a threshold value, the scanned image is determined to be a color image. However, in cases such as where a sheet of a document is recycled paper containing impurities and the like, a block including many impurities is erroneously determined to be a color block. Moreover, in a case where a false color is generated in edge portions of monochrome contents due to color shift of the scanning device, a block including a large amount of false color and the like is erroneously determined to be a color block. This determination method thus has a problem that, as a result, the document is erroneously determined to be color despite the fact that contents in the document are monochrome.
A method of detecting consecutiveness of color blocks is proposed to avoid this problem (see Japanese Patent Laid-Open No. 2001-103301). Japanese Patent Laid-Open No. 2001-103301 discloses a technique of determining that a scanned image is a color image in a case where the number of groups of consecutive color blocks is greater than a certain threshold value.
However, color blocks are not necessarily arranged consecutively in a case where contents in the image are large color contents or small color contents such as a string of letters of a small point size. Accordingly, this technique has a problem that correct determination cannot be made depending on the sizes, shapes, and arrangement of the contents.